package com.itheima.edu.info.maneger.controller;

import com.itheima.edu.info.maneger.domain.Student;
import com.itheima.edu.info.maneger.service.StudentService;

import java.util.Scanner;


public class StudentController extends BaseStudentController {
    //封装信息
    @Override
    public Student inputStudentInfo(String updateId) {
        Student newstudent = new Student();
        System.out.println("请输入姓名");
        String name = sc.next();
        System.out.println("请输入年龄");
        int age = sc.nextInt();
        System.out.println("请输入生日");
        String birthday = sc.next();
        //将用户输入的数据进行封装
        newstudent.setId(updateId);
        newstudent.setName(name);
        newstudent.setAge(age);
        newstudent.setBirthday(birthday);
        return newstudent;
    }
}
